FROM openjdk:8-jdk
LABEL maintainer=wangjie

ENV BASE_DIR="/data/project/ruoyi-admin"

ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

ADD target/ruoyi-admin.jar ${BASE_DIR}/ruoyi-admin.jar

WORKDIR ${BASE_DIR}

ENTRYPOINT ["sh","-c","java -jar \
      -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${BASE_DIR}/java_heapdump.hprof \
      ruoyi-admin.jar \
"]